<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html ><head ><title >Python: module func_timeout.exceptions</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head><body bgcolor="#f0f0f8" >

<table width="100%" cellspacing="0" cellpadding="2" border="0" summary="heading" >
<tr bgcolor="#7799ee" >
<td valign="bottom" >&nbsp;<br />
<font color="#ffffff" face="helvetica, arial" >&nbsp;<br /><big ><big ><strong ><a href="func_timeout.html" ><font color="#ffffff" >func_timeout</font></a>.exceptions</strong></big></big></font></td><td align="right" valign="bottom" ><font color="#ffffff" face="helvetica, arial" ><a href="func_timeout.html" >index</a></font></td></tr></table>
    <p ><tt >Copyright&nbsp;(c)&nbsp;2016&nbsp;Tim&nbsp;Savannah&nbsp;All&nbsp;Rights&nbsp;Reserved.<br />
&nbsp;<br />
Licensed&nbsp;under&nbsp;the&nbsp;Lesser&nbsp;GNU&nbsp;Public&nbsp;License&nbsp;Version&nbsp;3,&nbsp;LGPLv3.&nbsp;You&nbsp;should&nbsp;have&nbsp;recieved&nbsp;a&nbsp;copy&nbsp;of&nbsp;this&nbsp;with&nbsp;the&nbsp;source&nbsp;distribution&nbsp;as<br />
LICENSE,&nbsp;otherwise&nbsp;it&nbsp;is&nbsp;available&nbsp;at&nbsp;https://github.com/kata198/func_timeout/LICENSE</tt></p>
<p >
<table width="100%" cellspacing="0" cellpadding="2" border="0" summary="section" >
<tr bgcolor="#ee77aa" >
<td colspan="3" valign="bottom" >&nbsp;<br />
<font color="#ffffff" face="helvetica, arial" ><big ><strong >Classes</strong></big></font></td></tr>
    
<tr ><td bgcolor="#ee77aa" ><tt >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td >&nbsp;</td>
<td width="100%" ><dl >
<dt ><font face="helvetica, arial" ><a href="builtins.html#BaseException" >builtins.BaseException</a>(<a href="builtins.html#object" >builtins.object</a>)
</font></dt><dd >
<dl >
<dt ><font face="helvetica, arial" ><a href="func_timeout.exceptions.html#FunctionTimedOut" >FunctionTimedOut</a>
</font></dt></dl>
</dd>
</dl>
 <p >
<table width="100%" cellspacing="0" cellpadding="2" border="0" summary="section" >
<tr bgcolor="#ffc8d8" >
<td colspan="3" valign="bottom" >&nbsp;<br />
<font color="#000000" face="helvetica, arial" ><a name="FunctionTimedOut" >class <strong >FunctionTimedOut</strong></a>(<a href="builtins.html#BaseException" >builtins.BaseException</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8" ><td rowspan="2" ><tt >&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan="2" ><tt ><a href="#FunctionTimedOut" >FunctionTimedOut</a>(msg='',&nbsp;timedOutAfter=None,&nbsp;timedOutFunction=None,&nbsp;timedOutArgs=None,&nbsp;timedOutKwargs=None)<br />
&nbsp;<br />
<a href="#FunctionTimedOut" >FunctionTimedOut</a>&nbsp;-&nbsp;Exception&nbsp;raised&nbsp;when&nbsp;a&nbsp;function&nbsp;times&nbsp;out<br />
&nbsp;<br />
@property&nbsp;timedOutAfter&nbsp;-&nbsp;Number&nbsp;of&nbsp;seconds&nbsp;before&nbsp;timeout&nbsp;was&nbsp;triggered<br />
&nbsp;<br />
@property&nbsp;timedOutFunction&nbsp;-&nbsp;Function&nbsp;called&nbsp;which&nbsp;timed&nbsp;out<br />
@property&nbsp;timedOutArgs&nbsp;-&nbsp;Ordered&nbsp;args&nbsp;to&nbsp;function<br />
@property&nbsp;timedOutKwargs&nbsp;-&nbsp;Keyword&nbsp;args&nbsp;to&nbsp;function<br />
&nbsp;<br />
@method&nbsp;retry&nbsp;-&nbsp;Retries&nbsp;the&nbsp;function&nbsp;with&nbsp;same&nbsp;arguments,&nbsp;with&nbsp;option&nbsp;to&nbsp;run&nbsp;with&nbsp;original&nbsp;timeout,&nbsp;no&nbsp;timeout,&nbsp;or&nbsp;a&nbsp;different<br />
&nbsp;&nbsp;explicit&nbsp;timeout.&nbsp;@see&nbsp;<a href="#FunctionTimedOut" >FunctionTimedOut</a>.retry<br />&nbsp;</tt></td></tr>
<tr ><td >&nbsp;</td>
<td width="100%" ><dl ><dt >Method resolution order:</dt>
<dd ><a href="func_timeout.exceptions.html#FunctionTimedOut" >FunctionTimedOut</a></dd>
<dd ><a href="builtins.html#BaseException" >builtins.BaseException</a></dd>
<dd ><a href="builtins.html#object" >builtins.object</a></dd>
</dl>
<hr />
Methods defined here:<br />
<dl ><dt ><a name="FunctionTimedOut-__init__" ><strong >__init__</strong></a>(self, msg='', timedOutAfter=None, timedOutFunction=None, timedOutArgs=None, timedOutKwargs=None)</dt><dd ><tt >__init__&nbsp;-&nbsp;Create&nbsp;this&nbsp;exception&nbsp;type.<br />
&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;You&nbsp;should&nbsp;not&nbsp;need&nbsp;to&nbsp;do&nbsp;this&nbsp;outside&nbsp;of&nbsp;testing,&nbsp;it&nbsp;will&nbsp;be&nbsp;created&nbsp;by&nbsp;the&nbsp;func_timeout&nbsp;API<br />
&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@param&nbsp;msg&nbsp;&lt;str&gt;&nbsp;-&nbsp;A&nbsp;predefined&nbsp;message,&nbsp;otherwise&nbsp;we&nbsp;will&nbsp;attempt&nbsp;to&nbsp;generate&nbsp;one&nbsp;from&nbsp;the&nbsp;other&nbsp;arguments.<br />
&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@param&nbsp;timedOutAfter&nbsp;&lt;None/float&gt;&nbsp;-&nbsp;Number&nbsp;of&nbsp;seconds&nbsp;before&nbsp;timing-out.&nbsp;Filled-in&nbsp;by&nbsp;API,&nbsp;None&nbsp;will&nbsp;produce&nbsp;"Unknown"<br />
&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@param&nbsp;timedOutFunction&nbsp;&lt;None/function&gt;&nbsp;-&nbsp;Reference&nbsp;to&nbsp;the&nbsp;function&nbsp;that&nbsp;timed-out.&nbsp;Filled-in&nbsp;by&nbsp;API."&nbsp;None&nbsp;will&nbsp;produce&nbsp;"Unknown&nbsp;Function"<br />
&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@param&nbsp;timedOutArgs&nbsp;&lt;None/tuple/list&gt;&nbsp;-&nbsp;List&nbsp;of&nbsp;fixed-order&nbsp;arguments&nbsp;(&nbsp;*args&nbsp;),&nbsp;or&nbsp;None&nbsp;for&nbsp;no&nbsp;args.<br />
&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@param&nbsp;timedOutKwargs&nbsp;&lt;None/dict&gt;&nbsp;-&nbsp;Dict&nbsp;of&nbsp;keyword&nbsp;arg&nbsp;(&nbsp;**kwargs&nbsp;)&nbsp;names&nbsp;to&nbsp;values,&nbsp;or&nbsp;None&nbsp;for&nbsp;no&nbsp;kwargs.</tt></dd></dl>

<dl ><dt ><a name="FunctionTimedOut-getMsg" ><strong >getMsg</strong></a>(self)</dt><dd ><tt >getMsg&nbsp;-&nbsp;Generate&nbsp;a&nbsp;default&nbsp;message&nbsp;based&nbsp;on&nbsp;parameters&nbsp;to&nbsp;<a href="#FunctionTimedOut" >FunctionTimedOut</a>&nbsp;exception'<br />
&nbsp;<br />
@return&nbsp;&lt;str&gt;&nbsp;-&nbsp;Message</tt></dd></dl>

<dl ><dt ><a name="FunctionTimedOut-retry" ><strong >retry</strong></a>(self, timeout='RETRY_SAME_TIMEOUT')</dt><dd ><tt >retry&nbsp;-&nbsp;Retry&nbsp;the&nbsp;timed-out&nbsp;function&nbsp;with&nbsp;same&nbsp;arguments.<br />
&nbsp;<br />
@param&nbsp;timeout&nbsp;&lt;float/RETRY_SAME_TIMEOUT/None&gt;&nbsp;Default&nbsp;RETRY_SAME_TIMEOUT<br />
&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;RETRY_SAME_TIMEOUT&nbsp;:&nbsp;Will&nbsp;retry&nbsp;the&nbsp;function&nbsp;same&nbsp;args,&nbsp;same&nbsp;timeout<br />
&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;a&nbsp;float/int&nbsp;:&nbsp;Will&nbsp;retry&nbsp;the&nbsp;function&nbsp;same&nbsp;args&nbsp;with&nbsp;provided&nbsp;timeout<br />
&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;None&nbsp;:&nbsp;Will&nbsp;retry&nbsp;function&nbsp;same&nbsp;args&nbsp;no&nbsp;timeout<br />
&nbsp;<br />
@return&nbsp;-&nbsp;Returnval&nbsp;from&nbsp;function</tt></dd></dl>

<hr />
Data descriptors defined here:<br />
<dl ><dt ><strong >__weakref__</strong></dt>
<dd ><tt >list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr />
Methods inherited from <a href="builtins.html#BaseException" >builtins.BaseException</a>:<br />
<dl ><dt ><a name="FunctionTimedOut-__delattr__" ><strong >__delattr__</strong></a>(self, name, /)</dt><dd ><tt >Implement&nbsp;delattr(self,&nbsp;name).</tt></dd></dl>

<dl ><dt ><a name="FunctionTimedOut-__getattribute__" ><strong >__getattribute__</strong></a>(self, name, /)</dt><dd ><tt >Return&nbsp;getattr(self,&nbsp;name).</tt></dd></dl>

<dl ><dt ><a name="FunctionTimedOut-__reduce__" ><strong >__reduce__</strong></a>(...)</dt><dd ><tt >Helper&nbsp;for&nbsp;pickle.</tt></dd></dl>

<dl ><dt ><a name="FunctionTimedOut-__repr__" ><strong >__repr__</strong></a>(self, /)</dt><dd ><tt >Return&nbsp;repr(self).</tt></dd></dl>

<dl ><dt ><a name="FunctionTimedOut-__setattr__" ><strong >__setattr__</strong></a>(self, name, value, /)</dt><dd ><tt >Implement&nbsp;setattr(self,&nbsp;name,&nbsp;value).</tt></dd></dl>

<dl ><dt ><a name="FunctionTimedOut-__setstate__" ><strong >__setstate__</strong></a>(...)</dt></dl>

<dl ><dt ><a name="FunctionTimedOut-__str__" ><strong >__str__</strong></a>(self, /)</dt><dd ><tt >Return&nbsp;str(self).</tt></dd></dl>

<dl ><dt ><a name="FunctionTimedOut-with_traceback" ><strong >with_traceback</strong></a>(...)</dt><dd ><tt >Exception.<a href="#FunctionTimedOut-with_traceback" >with_traceback</a>(tb)&nbsp;--<br />
set&nbsp;self.<strong >__traceback__</strong>&nbsp;to&nbsp;tb&nbsp;and&nbsp;return&nbsp;self.</tt></dd></dl>

<hr />
Static methods inherited from <a href="builtins.html#BaseException" >builtins.BaseException</a>:<br />
<dl ><dt ><a name="FunctionTimedOut-__new__" ><strong >__new__</strong></a>(*args, **kwargs)<font color="#909090" ><font face="helvetica, arial" > from <a href="builtins.html#type" >builtins.type</a></font></font></dt><dd ><tt >Create&nbsp;and&nbsp;return&nbsp;a&nbsp;new&nbsp;object.&nbsp;&nbsp;See&nbsp;help(type)&nbsp;for&nbsp;accurate&nbsp;signature.</tt></dd></dl>

<hr />
Data descriptors inherited from <a href="builtins.html#BaseException" >builtins.BaseException</a>:<br />
<dl ><dt ><strong >__cause__</strong></dt>
<dd ><tt >exception&nbsp;cause</tt></dd>
</dl>
<dl ><dt ><strong >__context__</strong></dt>
<dd ><tt >exception&nbsp;context</tt></dd>
</dl>
<dl ><dt ><strong >__dict__</strong></dt>
</dl>
<dl ><dt ><strong >__suppress_context__</strong></dt>
</dl>
<dl ><dt ><strong >__traceback__</strong></dt>
</dl>
<dl ><dt ><strong >args</strong></dt>
</dl>
</td></tr></table></p></td></tr></table><p >
<table width="100%" cellspacing="0" cellpadding="2" border="0" summary="section" >
<tr bgcolor="#55aa55" >
<td colspan="3" valign="bottom" >&nbsp;<br />
<font color="#ffffff" face="helvetica, arial" ><big ><strong >Data</strong></big></font></td></tr>
    
<tr ><td bgcolor="#55aa55" ><tt >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td >&nbsp;</td>
<td width="100%" ><strong >RETRY_SAME_TIMEOUT</strong> = 'RETRY_SAME_TIMEOUT'<br />
<strong >__all__</strong> = ('FunctionTimedOut', 'RETRY_SAME_TIMEOUT')</td></tr></table>
</p></p></body></html>